﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Xiaov.SmartWeb.Model.Statistical.Select
{
    public class MonthSelect_JD:ISelect
    {
        public string DefaultValue
        {
            get;
            set;
        }

        public List<System.Web.UI.WebControls.ListItem> ListItems
        {
            get;
            set;
        }

        public void DataBind(string dw, string tn, string nf, string yf)
        {
            ListItems = new List<System.Web.UI.WebControls.ListItem>();
            ListItems.Add(new System.Web.UI.WebControls.ListItem("3","3"));
            ListItems.Add(new System.Web.UI.WebControls.ListItem("6", "6"));
            ListItems.Add(new System.Web.UI.WebControls.ListItem("9", "9"));
            ListItems.Add(new System.Web.UI.WebControls.ListItem("12", "12"));
            switch (DateTime.Now.Month.ToString())
            {
              case "1":
                DefaultValue = "3";
                break;
              case "2":
                DefaultValue = "3";
                break;
              case "3":
                DefaultValue = "3";
                break;
              case "4":
                DefaultValue = "6";
                break;
              case "5":
                DefaultValue = "6";
                break;
              case "6":
                DefaultValue = "6";
                break;
              case "7":
                DefaultValue = "9";
                break;
              case "8":
                DefaultValue = "9";
                break;
              case "9":
                DefaultValue = "9";
                break;
              case "10":
                DefaultValue = "12";
                break;
              case "11":
                DefaultValue = "12";
                break;
              case "12":
                DefaultValue = "12";
                break;
            }
        }
    }
}
